define(function(require,exports,module){
    
    require('common');
    var	tpl = require('../../tpl/scoreMall/allRecord.tpl');
    var curId = $("#integralRecordDiv");
    var pagerid = "kkpagerIntegralRecord";
    //初始化显示表格、搜索
    require.async(['./showTable','./search'],function(showTable,search){
       search.search('/member/score/log/list.html?',tpl,curId,pagerid);
       $(".integral_record").click(function(){
    	   showTable.ajaxUrl('/member/score/log/list.html?',tpl,curId,pagerid);
       });
       

    });
    
    $(".integralRecode").tabChange({
		isClick:true,
		isHover:false,
		childLi:".title_list li",//tab选项卡
		childContent:".list_div",//tab内容
		hoverClassName:"hover",//选中当前选项卡的样式
		callBack:false	
	});

  //删除记录
 /* $('.delete').live('click',function(){
    $this = $(this);
    parent = $this.parents('tr')
    id = parent.attr('data-id');

    require.async(['/plugins/layer-v1.8.4/skin/layer.css','/plugins/layer-v1.8.4/layer.min'],function(){
      //构造确认框DOM
          $.layer({
              type: 1,
              closeBtn: [0,true],
              title: "&nbsp;",
              area: ['450px', '190px'],
              border: [1, 1, '#cecfd0'],
              page: {
                  html: '<div class="tipsWrap w450"><div class="tipsTxt"><i class="iconfont tipIco">&#xe63c;</i><span>确定删除这条记录？</span></div><div class="tipsBtnBar"><a href="javascript:;" class="okBtn">确认</a><a href="javascript:;" class="cancleBtn">取消</a></div></div>'
              }
          });
          $('.okBtn').click(function(){
            $.ajax({
                type:'get',
                cache:false,
                url:'/scoreMall/deleteScoreConvert.html?id=' + id + '&randomTime=' + (new Date()).getTime(),
                dataType:'json',
                success:function(data){
                  if(data.result){
                    layer.closeAll();
                    $.layer({
                        type: 1,
                        closeBtn: [0,true],
                        title: "&nbsp;",
                        area: ['384px', '186px'],
                        border: [1, 1, '#cecfd0'],
                        time:3,
                        page: {
                            html: '<div class="tipsWrap w384"><div class="tipsTxt"><i class="iconfont okIco">&#xe63d;</i><span>删除兑换记录成功！</span></div><div class="tipsMsg">3秒后窗口自动关闭</div></div>'
                        },
                        close: function(index){
                          parent.remove();
                        },
                        end: function(){
                          parent.remove();
                        },
                        success: function(layero){
                          var time =3; 
                          function closeTime () {
                          time--;
                          $(".tipsMsg").html(time+"秒后窗口自动关闭");
                          }
                          setInterval(function(){
                          closeTime();
                        }, 1000);
                        }
                    });
                  }
                  else
                  {
                    layer.closeAll();
                    $.layer({
                        type: 1,
                        closeBtn: [0,true],
                                      title: "&nbsp;",
                        area: ['384px', '186px'],
                        border: [1, 1, '#cecfd0'],
                        time:3,
                        page: {
                            html: '<div class="tipsWrap w384"><div class="tipsTxt"><i class="iconfont errIco">&#xe63e;</i><span>删除失败！</span></div><div class="tipsBtnBar"><a href="javascript:;" class="okBtn failBtn">确定</a></div></div>'
                        },
                        close: function(index){
                          layer.closeAll();
                        }
                    });
                    $(".failBtn").click(function(){
                      layer.closeAll();
                    });
                  }
                }
              })
          })
          //取消删除事件
          $(".cancleBtn").click(function(){
            layer.closeAll();
          });
    })
  })*/

});

